<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class Post extends CI_Model {
    private  $_name = "wp_posts";
    function __construct()
    {
        parent::__construct();
    }
    function get_last_item()
    {
      $this->db->order_by('id', 'DESC');
      $query = $this->db->get($this->_name, 1);

      return $query->result();
    }
}